/**
 * @file dijkstral.h
 * @author 范文宇 (2643660853@qq.com)
 * @brief 
 * @version 1.0
 * @date 2022-10-21
 * 
 * @copyright Copyright (c) 2022
 * 
 */
#pragma once

#include <opencv2/opencv.hpp>

class Dijkstral
{
private:
    std::vector<double_t> dist;      

    std::vector<std::vector<int>> path; 

    int minOfDist();                    

public:
    Dijkstral(int point_width, int point_height, cv::Point2i startingPoint, cv::Point2i finishingPoint,
              const std::vector<int> &vertex, const cv::Mat1d &edge);

    ~Dijkstral() = default;

    std::vector<int> &getShortestPath(int point_width, int point_height,
                                      cv::Point2i startingPoint, cv::Point2i finishingPoint,
                                      const std::vector<int> &vertex, const cv::Mat1d &edge);
};
using Dijkstral_ptr = std::shared_ptr<Dijkstral>;